import sys
if sys.version_info[1] > 5:
    from typing import TextIO
else:
    from typing.io import TextIO
from antlr4.error.Errors import LexerNoViableAltException
from miniSysYLexer import miniSysYLexer


class HatLexer(miniSysYLexer):
    def __init__(self, input=None, output: TextIO = sys.stdout):
        super().__init__(input, output)

    def notifyListeners(self, e: LexerNoViableAltException):
        exit(1)
